
Data and replication codes for "War Discourse and Disaster Premia: 160 Years of Evidence from the Stock Market" by David Hirshleifer, Dat Mai, and Kuntara Pukthuanthong published in the Review of Financial Studies (2024). Please cite this paper if you use the data.

The package consists of 3 folders:

1/ codes: 
-- figures and tables: self-contained R scripts to generate the figures and tables reported in the main text;
-- 00_import_libraries.R: imports libraries and self-defined functions used in the main R scripts in figures and tables;
-- fn_predict_lm.R: functions to perform in- and out-of-sample return predictions using OLS and PLS.

2/ input:
-- combined_data.rds: the main data file containing narrative indexes (i.e., sLDA topic weights) for 14 topics used in the main paper ("base"); manually-counted frequencies of 14 topics ("raw"); and topic weight for War with 1 seed word for War and 50 unseeded topics.
-- narrative_dicts_v2.rds: seed words for 14 topics used in the main paper.

3/ output:
-- figures: figures generated by the R scripts in codes/figures/;
-- tables: tables generated by the R scripts in codes/tables;
-- os: out-of-sample return forecasts generated by running codes/tables/table_8P.R.

Note: The package can be opened as a folder in VS Code or Positron or as a project in RStudio to maintain all data paths (i.e., no need to modify any data path).